package com.tju.resource.server;

import com.tju.resource.tool.result.Result;
import com.tju.resource.model.SysRole;
import com.tju.resource.tool.tool.ClientParameters;

import java.util.List;
import java.util.Map;

/**
 * Role business interface
 *
 * @Author CLS
 * @Date 2021/12/31 14:22
 */
public interface SysRoleService {

    class Response {
        public static final String NONE_SR = "角色不存在!";
        public static final String NONE_NA = "角色名称不可为空!";

        public static final String DUP_NA = "角色名称已存在!";
    }

    SysRole getCharacter(Long cId);

    Result<Object> getCharacterAll(ClientParameters parameter);

    /**
     * Return the SysRole id.
     */
    Long addCharacter(Map<String, String> params);

    int updCharacter(Map<String, String> params);

    int delCharacter(Map<String, String> params);

    boolean hasRoleName(String roleName);

    List<SysRole> byUser (String username);

}
